<%@page import="com.nebula.util.UsernameEncryptionUtil"%>
<%@page import="com.nebula.vo.UrlShareListVo"%>
<%@page import="com.nebula.util.FileUtil"%>
<%@page import="com.nebula.common.Const"%>
<%@page import="com.nebula.pojo.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
	User user = (User)session.getAttribute(Const.USERINFO);
	UrlShareListVo urlShareListVo = (UrlShareListVo) request.getAttribute("urlShareListVo");
 %>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="static/html5shiv.js"></script>
<script type="text/javascript" src="static/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/h-ui.admin/css/style.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/layout2-1.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/share-multi.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/page-ui.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/cover.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/header-theme.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/magic-input.min.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/lightbox2/2.8.1/css/lightbox.css" >

<!--[if IE 6]>
<script type="text/javascript" src="static/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->

<title>${urlShareListVo.title}_免费高速下载 | 大岭山中学网盘-分享无限制</title>

<style type="text/css">
	body{
		background: #edf1f5;
	}
	.img {
		width: 30px;
		height: 30px;
	}
	.EgMMec a:hover {
		text-decoration: underline;
	}
	.EgMMec a {
		color: blue;
	}
</style>

</head>

<body onload="getCookie()">
<input type="hidden" value="<%=request.getParameter("surl")%>" id="surl">
<input type="hidden" value="${UsernameEncryptionUtil.encryptionUsername(urlShareListVo.username)}" id="encryUsername">
<input type="hidden" value="" id="folderId">
<header class="navbar-wrapper">
	<div class="navbar navbar-fixed-top">
		<div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" title="大岭山中学网盘" style="font-size: 24px" href="/nebula/index.action"><img alt="大岭山中学" src="../static/image/dlszx.png" width="45px" height="45px">  大岭山中学网盘</a>
		<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
			<ul class="cl">
				<li><img class="nav-user-photo img" src="${pageContext.request.contextPath}/static/avatars/user.jpg" alt="用户头像" /></li>
				<li class="dropDown dropDown_hover">
					<a href="#" class="dropDown_A"><%=user.getUsername()%>&nbsp;<i class="Hui-iconfont">&#xe6d5;</i></a>
					<ul class="dropDown-menu menu radius box-shadow">
						<li style="background: blue;">
						<img class="nav-user-photo img" src="${pageContext.request.contextPath}/static/avatars/user.jpg" alt="用户头像" /><%=user.getUsername()%>
						<br>
						<%
						if(!"普通用户".equals(user.getUserGroups().getGroupname())){
						%>
							<img src="${pageContext.request.contextPath}/static/image/vip.png" alt="vip" />&nbsp;
						<%
						}
						 %>
						<span><%=user.getUserGroups().getGroupname()%></span>
						</li>
						<li>
						<%
						if("超级会员".equals(user.getUserGroups().getGroupname())){
						%>
							<a href="javascript:;" class="disabled">永久超级会员</a>
						<%
						}else{
						%>
							<a href="javascript:;" id="member">开通超级会员</a>
						<%
						}
						%>
						</li>
						<li><a href="javascript:;" id="personalData">个人资料</a></li>
						<li><a href="javascript:;" id="myOrder">我的订单</a></li>
						<li><a href="javascript:;" id="changePwd">修改密码</a></li>
						<li><a href="javascript:;" id="logout">退出</a></li>
					</ul>
				</li>
				<li id="Hui-msg"> <a href="#" title="会员中心" id="member"><i class="Hui-iconfont" style="font-size:18px">&#xe6cc;</i></a> </li>
				<li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
					<ul class="dropDown-menu menu radius box-shadow">
						<li><a href="javascript:;" data-val="default" title="默认（蓝色）">默认（蓝色）</a></li>
						<li><a href="javascript:;" data-val="black" title="黑色">黑色</a></li>
						<li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
						<li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
						<li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
						<li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
					</ul>
				</li>
			</ul>
		</nav>
	</div>
</div>
</header>
<div id="doc" style="width: auto;">
	<div id="bd" class="global-clearfix">
		<div id="bd-main">
			<div class="bd-left">
				<div class="module-share-header">
					<div class="slide-show-header clearfix">
						<div class="slide-show-left">
							<h2 class="file-name" title="${urlShareListVo.title}">
								<img alt="" src="${urlShareListVo.icon}">
								${urlShareListVo.title}
							</h2>
						</div>
						
						<div class="slide-show-right">
							<span class="slide-header-funcs"></span>
							<div class="module-share-top-bar g-clearfix">
								<div class="bar" style="white-space: nowrap;position: relative;">
									<div class="button-box-mark" style="display: inline-block;*display:inline;*zoom:1;
									width: 1px;height: 1px;line-height: 0"></div>
									<div class="x-button-box" style="position: absolute;top: 0;line-height: normal;
									padding-top: 0px">
										<%
										if(user.getUsername().equals(urlShareListVo.getUsername())){
										%>
											<a class="btn btn-secondary-outline radius" href="javascript:;" title="取消分享" id="cancel">
												<span class="g-button-right">
													<i class="Hui-iconfont" style="font-size: 16px">&#xe6e2;</i>
													<span class="text" style="width: auto;">取消分享</span>
												</span>
											</a>
											&nbsp;
											<a class="btn btn-secondary-outline radius" href="javascript:;" title="下载" id="download">
												<span class="g-button-right">
													<i class="Hui-iconfont" style="font-size: 16px">&#xe641;</i>
													<span class="text" style="width: auto;">下载</span>
												</span>
											</a>
											&nbsp;
										<%
										}else{
										%>
											<a class="btn btn-primary radius" href="javascript:;" title="保存到云盘" id="save">
												<span class="g-button-right">
													<i class="Hui-iconfont" style="font-size: 16px">&#xe644;</i>
													<span class="text" style="width: auto;">保存到大岭山中学网盘</span>
												</span>
											</a>
											&nbsp;
											<a class="btn btn-secondary-outline radius" href="javascript:;" title="下载" id="download">
												<span class="g-button-right">
													<i class="Hui-iconfont" style="font-size: 16px">&#xe641;</i>
													<span class="text" style="width: auto;">下载</span>
												</span>
											</a>
											&nbsp;
										<%
										}
										%>
									</div>
								</div>
							</div>
						</div>
						
						<div class="cb"></div>
						<div class="slide-show-other-infos">
							<div class="share-file-info">
								<span style="color: #666;font-size: 10px;">${urlShareListVo.sharingTime}</span>
							</div>
							<div class="share-valid-check">
								失效时间：${urlShareListVo.failureTime}
							</div>
					    </div>
					</div>
				</div>
			</div>
			<div class="share-list" id="shareqr">
				<div class="KPDwCE" style="height: 730px;">
					<div class="JDeHdxb">
						<span class="EgMMec">
						<%
							if(request.getParameter("parentId") == null){
								out.print("全部文件");
							}else{
							%>
							<a href="javascript:;" onclick="window.history.go(-1);">返回上一级</a> | <a href="/nebula/share/share_list.action?surl=<%=request.getParameter("surl")%>">全部文件</a> > 当前位置：<%=request.getAttribute("folderName")%>
							<%
							}
						 %>
						</span>
						<table class="table table-border table-hover table-sort table-responsive" >
							<thead id="t-head">
								<tr class="text-c">
									<th width="10"><input type="checkbox" name="checkAll" class="mgc mgc-primary" onclick="CheckAll(this)"></th>
									<th class="text-l" width = "45%">文件名</th>
									<th>大小</th>
									<th>修改日期</th>
								</tr>
							</thead>
							<tbody id="fileList">
								<c:if test="${empty list}">
									<table>
				      					<tr><td><span style="font-size: 16px">暂无数据......</span></td></tr>
									</table>
								</c:if>
								<c:if test="${!empty list}">
									<c:forEach items="${list}" var="val">
										<tr class="text-c" id="${val.id}">
											<td width="10">
												<input class="mgc mgc-primary" type="checkbox" name="fileOrFolder" onclick="showSpan(this)" value="${val.id}">
											</td>
											<td class="text-l">
												<c:if test="${val.isRead == 0}">
													<input type="hidden" value="${val.name}">
													<span id="title" style="font-size: 16px">
														<img alt="" src="${pageContext.request.contextPath}/${val.icon}">
														&nbsp;&nbsp;${val.name}
													</span>
												</c:if>
												<c:if test="${val.isRead == 1 && val.isFolder == 1}">
													<input type="hidden" value="${val.name}">
													<a style="cursor:pointer;font-size: 16px;" 
													href="/nebula/share/share_list.action?surl=<%=request.getParameter("surl")%>&parentId=${val.id}"
													class="text-primary"
													onclick="addClickClass(this)">
													<img alt="" src="${pageContext.request.contextPath}/${val.icon}">
													&nbsp;&nbsp;${val.name}</a>
												</c:if>
												<c:if test="${val.isRead == 1 && val.isVideo == 1}">
													<input type="hidden" value="${val.name}">
													<a style="cursor:pointer;font-size: 16px;" 
													class="text-primary"
													href="/nebula/play-video.action?url=${val.fileShortUrl}&title=${val.name}"
													target="_blank"
													onClick="videoRead('${val.fileExtension}')">
													<img alt="" src="${pageContext.request.contextPath}/${val.icon}">
													&nbsp;&nbsp;${val.name}</a>
												</c:if>
												<c:if test="${val.isRead == 1 && val.isImage == 1}">
													<input type="hidden" value="${val.name}">
													<a style="cursor:pointer;font-size: 16px;" 
													class="text-primary"
													href="/rs/${val.fileShortUrl}" 
													data-lightbox="gallery">
													<img alt="" src="${pageContext.request.contextPath}/${val.icon}">
													&nbsp;&nbsp;${val.name}</a>
												</c:if>
												<c:if test="${val.isRead == 1 && val.isMusic == 1}">
													<input type="hidden" value="${val.name}">
													<a style="cursor:pointer;font-size: 16px;" 
													href="javascript:;"
													target="_blank"
													class="text-primary"
													onClick="product_edit()">
													<img alt="" src="${pageContext.request.contextPath}/${val.icon}">
													&nbsp;&nbsp;${val.name}</a>
												</c:if>
												<c:if test="${val.isRead == 1 && val.isDocument == 1}">
													<input type="hidden" value="${val.name}">
													<a style="cursor:pointer;font-size: 16px;" 
													href="javascript:;"
													class="text-primary"
													onClick="documentRead('${val.fileExtension}','${val.name}','${val.fileShortUrl}')">
													<img alt="" src="${pageContext.request.contextPath}/${val.icon}">
													&nbsp;&nbsp;${val.name}</a>
												</c:if>
											</td>
											<td>${val.fileSize}</td>
											<td>${val.updatedtime}</td>
										</tr>
									</c:forEach>
								</c:if>
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<div class="bd-aside">
				<div class="module-share-person-info">
					<div class="share-person-inner global-clearfix haha">
						<div class="share-person-avatar">
							<img alt="${urlShareListVo.username}" src="${pageContext.request.contextPath}/static/avatars/user.jpg" title="去Ta的分享主页">
						</div>
						<div class="share-person-data self">
							<div class="share-person-data-top">
								<span id="userinfo-span" title="去Ta的分享主页"></span>
							</div>
						</div>
					</div>
					<div class="share-person-intro" title="说明：Ta很懒什么也没留下。" style="padding-top: 20px;">说明：Ta很懒什么也没留下。</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath}/static/layer/2.4/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.base64.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.cookie.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/lightbox2/2.8.1/js/lightbox.min.js"></script>
<script type="text/javascript">
function getCookie(){
	var validate = $.cookie("validate");
	var isSharer = $.cookie("isSharer");
	var isPublic = $.cookie("isPublic");
	if(isSharer == "true"){
		$.cookie("isSharer",'',{expires: -1,path: '/'});
		$("#userinfo-span").html('${urlShareListVo.username}');
	}
	else if(isPublic == "true"){
		$.cookie("isPublic","",{expires: -1,path: "/"});
		$("#userinfo-span").html($("#encryUsername").val());
	}
	else if(validate){
		if($.base64.decode(validate) != $("#surl").val()){
			window.location = "/nebula/share/init.action?surl="+$("#surl").val()
		}else {
			$("#userinfo-span").html($("#encryUsername").val());
		}
	}else{
		window.location = "/nebula/share/init.action?surl="+$("#surl").val()
	}
}

function CheckAll(obj){
	var allSel = document.getElementsByName("fileOrFolder");
	if(obj.checked){
		for(i = 0;i < allSel.length;i++){
			allSel[i].checked = true;
		}
		$("#rename").addClass('disabled');
		$("#t-head").html("<tr><td><input class='mgc mgc-primary' type='checkbox' checked=true name='checkAll' onclick='CheckAll(this)'></td>"+
		"<td width = '45%'>已选中"+$("input[name=fileOrFolder]:checked").size()+"个文件/文件夹</td><td></td><td></td></tr>")
		$("#fileList").find('tr').attr("style","background-color: #f5f5f5");
	}else{
		for(i = 0;i < allSel.length;i++){
			allSel[i].checked = !allSel[i].checked;
		}
		$("#t-head").html("<tr class='text-c'>"+
					"<th width='10'><input class='mgc mgc-primary' type='checkbox' name='checkAll' onclick='CheckAll(this)'></th>"
					+"<th class='text-l' width = '45%'>文件名</th>"
					+"<th>大小</th>"
					+"<th>修改日期</th>"
				+"</tr>")
		$("#rename").removeClass('disabled');
		$("#fileList").find('tr').removeAttr("style","background-color: #f5f5f5");
	}
}

function showSpan(obj){
	if(obj.checked){
		$("#t-head").html("<tr><td><input class='mgc mgc-primary' type='checkbox' name='checkAll' onclick='CheckAll(this)'></td>"+
		"<td width = '45%'>已选中"+$("input[name=fileOrFolder]:checked").size()+"个文件/文件夹</td><td></td><td></td></tr>")
		$(obj).parent().parent().attr("style","background-color: #f5f5f5");
	}else if($("input[name=fileOrFolder]:checked").size() == 0){
		$("#t-head").html("<tr class='text-c'>"+
					"<th width='10'><input class='mgc mgc-primary' type='checkbox' name='checkAll' onclick='CheckAll(this)'></th>"
					+"<th class='text-l' width = '45%'>文件名</th>"
					+"<th>大小</th>"
					+"<th>修改日期</th>"
				+"</tr>")
		$(obj).parent().parent().removeAttr("style");
	}else{
		$("#t-head").html("<tr><td><input class='mgc mgc-primary' type='checkbox' name='checkAll' onclick='CheckAll(this)'></td>"+
		"<td width = '45%'>已选中"+$("input[name=fileOrFolder]:checked").size()+"个文件/文件夹</td><td></td><td></td></tr>")
		$(obj).parent().parent().removeAttr("style");
	}
	if($("input[name=fileOrFolder]:checked").size() > 1){
		$("#rename").addClass('disabled');
	}else{
		$("#rename").removeClass('disabled');
	}
}

var winHeight = $(window).height();

function documentRead(ext,title,shortURL){
	if(ext.toLocaleLowerCase() == "txt"){
		var url = "/rs/" + shortURL;
		var index = layer.open({
			type: 2,
			title: title + "-文本阅读",
			area :['800px',winHeight+'px'],
			content: url
		});
	}
	if(ext.toLocaleLowerCase() == "pdf"){
		var url = "/rs/" + shortURL;
		var index = layer.open({
			type: 2,
			title: title + "-PDF阅读",
			content: url
		});
		layer.full(index);
	}
	if(ext.toLocaleLowerCase() == "doc" || ext.toLocaleLowerCase() == "docx"){
		var url = "http://privatecloud.s1.natapp.cc" + "/rs/" + shortURL;
		var index = layer.open({
			type: 2,
			title: title + "-DOC阅读",
			content: "http://www.xdocin.com/xdoc?_func=to&_format=pdf&_cache=1&_xdoc=" + url
		});
		layer.full(index);
	}
}

function randomString(len){
	len = len || 32;
	var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
	var maxPos = $chars.length;
	var pwd = '';
	for (i = 0; i < len; i++) {
　　　　	pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
　　	}
　　	return pwd;
}

function videoRead(ext){
	if(ext.toLocaleLowerCase() != "mp4"){
		alert("视频在线预览功能暂时仅支持MP4格式");
	}
}
$(function(){
	$("#save").click(function(){
		if($("input[name=fileOrFolder]:checked").size() == 0){
			layer.msg('请选择一下你要保存的文件哦',{offset:"t"});
		}else{
			var valArr = [];
			$("input[name=fileOrFolder]:checked").each(function(i){
				valArr[i] = $(this).val();
			})
			var index = layer.open({
				type: 2,
				area: ['520px','300px'],
				fix: false, //不固定
				title: "保存到私有云",
				content:"/nebula/directory.action?valArr="+valArr+"&type=save&surl="+$("#surl").val()
			});
		}
	});
	$("#download").click(function(){
		if($("input[name=fileOrFolder]:checked").size() == 0){
			layer.msg('您还没有选择下载的文件',{offset:"t"});
		}else{
			var valArr = [];
			$("input[name=fileOrFolder]:checked").each(function(i){
				if($(this).val().length <= 11){
					alert("文件夹下载功能暂未开发");
					return false;
				}else{
					valArr[i] = $(this).val();
				}
			})
			var url;
			if(valArr == ""){
				return false;
			}else if(valArr.length == 1){
				url = "/nebula/file/download.action;jsessionid=<%=session.getId()%>;code="+randomString(4)
				+"?fileId="+valArr[0];
				layer.msg('正在准备下载，请稍后...',{offset:"t"});
				$.ajax({
					type: "post",
					url: "/nebula/share/updateDownloads.action",
					data : {
						surl : $("#surl").val(),
					},
					dataType: "json",
					success : function(data){
						console.log(data.msg);
					}
				});
				window.location = url;
			}else{
				layer.confirm("文件打包过程可能需要很长一段时间，确定使用打包下载吗？（大文件不建议使用）",{title:"确定使用打包下载"},function(index){
					var i;
					$.ajax({
						type: "post",
						url: "/nebula/file/compress.action",
						data : {
							fileIdGroup : function(){
								return valArr;
							}
						},
						dataType : "json",
						beforeSend: function(){
							i = layer.msg('文件正在打包，打包过程时间较长，请耐心等待...', {icon: 16,shade: [0.5, '#f5f5f5'],scrollbar: false,offset: '0px', time:-1}) ;  
						},
						success : function(data){
							layer.close(i);
							if(data.status == 0){
								url = "/nebula/file/plDownload.action;jsessionid=<%=session.getId()%>;code="+randomString(4)
								+"?zipname="+data.data.zipname+"&ctm="+data.data.ctm;
								$.ajax({
									type: "post",
									url: "/nebula/share/updateDownloads.action",
									data : {
										surl : $("#surl").val()
									},
									dataType: "json",
									success : function(data){
										console.log(data.msg);
									}
								});
								window.location = url;
							}else{
								layer.msg(data.msg);
							}
						}
					});
					layer.close(index);
				});
			}
		}
	});
	
	$("#cancel").click(function(){
		layer.confirm("<div style='text-align: center;padding: 30px 22px 22px'>取消分享后，该条分享记录将被删除，好友将无法再访问此分享链接。你确认要取消分享吗？</div>",{title:"确认取消分享",area: ['520px','230px']},function(index){
			var i;
			$.ajax({
				type : "post",
				url : "/nebula/share/cancelShare.action",
				data : {
					surl : $("#surl").val()
				},
				dataType : "json",
				beforeSend: function () {  
		            i = layer.msg('正在取消分享,请稍后...', {icon: 16,shade: [0.5, '#f5f5f5'],scrollbar: false,offset: '0px', time:100000}) ;  
		        },
				success : function(data){
					layer.close(i);
					layer.msg(data.msg,{offset:'t',time:1000},function(){
						closeWin();
					});
				}
			});
			layer.close(index);
		});
	});
	
	$("body").on("click","#look",function(){
		$.cookie("parentId",$.base64.encode($("#folderId").val()),{expires: 1,path:'/'});
	});
	
	$("#logout").click(function(){
		layer.confirm("<div style='text-align: center;padding: 25px 20px 20px'>确定要退出大岭山中学网盘吗？</div>",{title:"提示",area: ['427px','197px']},function(index){
			var i;
			$.ajax({
				type : "post",
				url : "/nebula/user/logout.action",
				success : function(data){
					window.location = "/nebula/login.jsp";
					$.cookie("exit","exit",{expires: 7,path: "/"});
					$.cookie("password",'',{expires: -1,path: "/"});
				}
			});
		layer.close(index);
	});
})
$("body").on("click","#member",function(){
		layer.open({
			type: 2,
			area: ['550px','450px'],
			fix: false, //不固定
			shade:0.4,
			title: '开通会员',
			content: '/nebula/open-member.action'
		});
	});
	
	$("#changePwd").click(function(){
		layer.open({
			type: 2,
			area: ['550px','320px'],
			fix: false, //不固定
			shade:0.4,
			title: '修改密码',
			content: '/nebula/change-password.action'
		});
	});
	
	var winHeight = $(window).height();
	
	$("#myOrder").click(function(){
		layer.open({
			type: 2,
			area: ['1000px',(winHeight - 50) +'px'],
			fix: false, //不固定
			shade:0.4,
			title: '我的订单',
			content: '/nebula/my-order.action'
		});
	});
	
	$(".disabled").click(function(){
		var type = '<%=user.getUserGroups().getGroupname()%>';
		layer.alert("尊敬的\"" + type + "\",您已拥有该系统最高权限,无需继续订购");
	});
	
	$("#personalData").click(function(){
		layer.open({
			type: 2,
			area: ['500px','500px'],
			fix: false, //不固定
			shade:0.4,
			title: '个人资料',
			content: '/nebula/personal-information.action'
		});
	});
	
});
</script>
</body>
</html>
